package org.poem.entity;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public class JSR250WayBeanDemo implements InitializingBean,DisposableBean{


    @PostConstruct
    public void initMethod(){
        System.err.println(" @JSR250-init-method.");
    }

    @PreDestroy
    public void destoryMethod(){
        System.err.println("@JSR250-destory-method.");
    }

    @Override
    public void destroy() throws Exception {
        System.err.println("@JSR250 InitializingBean destroy method.");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.err.println("@JSR250 InitializingBean afterPropertiesSet method.");
    }
}
